#include <stdio.h>
#include <stdlib.h>

#include "cmdline.h"

int main(int argc, char *argv[])
{
    struct gengetopt_args_info ai;
    if (cmdline_parser (argc, argv, &ai) != 0) {
        exit(1);
    }

    printf("filename_arg=%s\n", ai.filename_arg);

    if (ai.size_given) {
        printf("size args %d %d %d\n",
                ai.size_arg[0], ai.size_arg[1], ai.size_arg[2]);
    }

    printf("array args: ");
    for (int i=0; i<ai.array_given; ++i) {
        printf("%d ", ai.array_arg[i]);
    }
    printf("\n");

    if (ai.long_option_given) {
        printf("long option: %f\n", ai.long_option_arg);
    }

    printf("default_value arg: %f\n", ai.default_value_arg);
    printf("console flag: %d\n", ai.console_flag);

    return 0;
}
